// app/model/user.js
module.exports = (app) => {
	const {
		STRING,
		INTEGER,
		BIGINT,
		DATE,
		DECIMAL
	} = app.Sequelize;
	const DtsOrderGoods = app.model.define("orderGoods", {
		id: {
			type: INTEGER,
			primaryKey: true,
			autoIncrement: true
		},
		orderId: INTEGER,
		goodsName: STRING,
		picUrl: STRING,
		price: DECIMAL
	}, {
		tableName: "dts_order_goods",
		paranoid: false,
		timestamps: false,
		freezeTableName: true
	});

	// 声明关系
	// DtsOrderGoods.associate = function() {
	// 	//	学生属于一个班级，外键关联是班级id
	// 	DtsOrderGoods.belongsTo(app.model.DtsOrder, {
	// 		foreignKey: "orderId"
	// 	});
	// }

	return DtsOrderGoods;
};